using cuberga.TSP;
using cuberga.Workflow;
using System;

namespace cuberga.GA
{
    public class TSPPopulationInitializer: PopulationInitializer
    {
        //private int _populationSize;
        //private int _genotypeSize;
        public TSPPopulationInitializer(string populationSize): base(populationSize)
        {
        }

        public override void Perform()
        {
            int genotypeSize;
            
            genotypeSize = CityList.Instance.PointsCount;

            PermutationPopulation population = new PermutationPopulation();
            population.Initialize(_populationSize, genotypeSize);

            BlackBoard.Instance.Write("Population", population);
        }
    }
}
